{% load static from staticfiles %}
<!DOCTYPE html>
<html>
<head>
    <title>传染病预警系统1.0</title>
    <meta charset="UTF-8">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- The above 4 meta tags *Must* come first in the head; any other head content must come *after* these tags -->

    <!-- Stylesheet -->
    <link rel="stylesheet" href="http://www.rpcomputationalbiology.cn/static/style.css">
    <link rel="stylesheet" href="http://www.rpcomputationalbiology.cn/static/css/button.css">
    <!-- Bootstrap core CSS -->
    <link href="/static/css/index/bootstrap.min.css" rel="stylesheet">
    <link href="https://img.jigao616.com/css/style.css" rel="stylesheet">
    <link href="/static/css/common/common.css" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #app {
            width: 100vw;
            height: 100vh;
            display: flex;
        }

        .side-nav {
            background-color: rgb(227, 227, 227);
            min-width: 187px;
            height: 100%;
            box-shadow: -55px 67px 126px #000;
            box-sizing: border-box;
            padding: 24px 14px 24px 14px;
        }

        .block {
            margin-bottom: 18px;
        }

        .block>.key {
            font-size: 14px;
        }

        .block>select {
            font-size: 12px;
            padding: 2px;
            margin-top: 12px;
            margin-left: 14px;
            outline: none;
            width: 97px;
        }

        .btn-item {
            width: 97px;
            height: 24px;
            margin-left: 14px;
            background-color: rgb(240, 240, 240);
            font-size: 14px;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 18px;
            cursor: pointer;
            transition: all 0.25s linear;
            box-shadow: 2px 2px 1px #000;
        }
        .btn-item:hover {
            transform: scale(1.1)
        }

        .block>input {
            width: 97px;
            height: 17px;
            margin-left: 14px;
            outline: none;
        }

        .content-frame {
            max-width: 1733px;
            height: 100%;
        }

        .coverImg {
            margin-left: 240px;
            margin-top: 60px;
        }

        .coverImg.coverImgChoose {
            margin-left: 77px;
        }
    </style>
</head>

<body>
<header class="header-area">
    <!-- Top Header Area -->
    <div class="top-header-area d-flex justify-content-between align-items-center">
    </div>
    <!-- Navbar Area -->
    <div id="sticky-wrapper" class="sticky-wrapper is-sticky" style="height: 80px;">
        <div class="clever-main-menu" style="width: 100%; position: fixed; top: 0px; z-index: inherit;">
        <div class="classy-nav-container light left breakpoint-off">
            <!-- Menu -->
            <nav class="classy-navbar justify-content-between" id="cleverNav">

                <!-- Logo -->
                <a class="nav-brand" href="/index"><img src="{% static 'image/logo4.png' %}" alt="" style="width:550px;height:80px;margin-right:15px"></a>

                <!-- Navbar Toggler -->
                <div class="classy-navbar-toggler">
                    <span class="navbarToggler"><span></span><span></span><span></span></span>
                </div>

                <!-- Menu -->
                <div class="classy-menu">

                    <!-- Close Button -->
                    <div class="classycloseIcon">
                        <div class="cross-wrap"><span class="top"></span><span class="bottom"></span></div>
                    </div>

                    <!-- Nav Start -->
                    <div class="classynav">
                        <ul>
                            <li><a href="/index">主页</a></li>
                            <li ><a href="/visual">例子</a>
                            <li ><a href="/mysystem">预测</a>
                            <li><a href="/incidence">发病情况</a></li>
                            <li><a href="/inform/inform">研究现状</a></li>
                            <li><a href="/upfile">上传</a></li>
                        </ul>

<!--                        &lt;!&ndash; Search Button &ndash;&gt;-->
<!--                        <div class="register-login-area">-->
<!--                            <a href="/analysis" class="btn active">Run TPP</a>-->
<!--                        </div>-->

                        <!-- Register / Login -->
<!--                        <div class="register-login-area">-->
<!--                            <a href="/user/register" class="btn">注册</a>-->
<!--                            <a href="/user/login" class="btn">登录</a>-->
<!--                        </div>-->

                    </div>
                    <!-- Nav End -->
                </div>
            </nav>
        </div>
    </div></div>
</header>
 <div  class="container" style="height: 200px;margin-left:70px" >
    <div id="app" >
        <div class="side-nav" >
            <section class="block">
                <div class="key">传染病类别</div>
                <select v-model="illTypeChoosed" @change="illTypeChange">
{#                    <option v-for="item in illTypeList" :value="item">{{item}}</option>#}
                    <option value="肺结核">肺结核</option>
                    <option value="流行性感冒">流行性感冒</option>
                    <option value="HIV">HIV</option>
{#                    <option v-for="item in illTypeList" :value="1">"肺结核</option>#}
{#                    <option v-for="item in illTypeList" :value="2">流行性感冒</option>#}
{#                    <option v-for="item in illTypeList" :value="3">HIV</option>#}
                </select>
            </section>
            <section class="block">
                <div class="key">按年月日</div>
                <select v-model="dateTypeChoosed" @change="dateTypeChange">
{#                    <option v-for="item in dateTypeList" :value="item">{{item}}</option>#}
                    <option value="年">年</option>
                    <option value="月">月</option>
                    <option value="日">日</option>
{#                     <option v-for="item in dateTypeList" :value="1">年</option>#}
{#                    <option v-for="item in dateTypeList" :value="2">月</option>#}
{#                    <option v-for="item in dateTypeList" :value="3">日</option>#}
                </select>
            </section>
            <div class="btn-item" @click="dataAnalys">数据分析</div>
            <div class="btn-item" @click="imgDraw">图标绘制</div>
<!--            <section class="block">-->
<!--                <input />-->
<!--            </section>-->
        </div>
        <div class="content-frame">
            <img :src="img_display" class="coverImg" :class="{coverImgChoose:isChoose}">
        </div>
    </div>
 </div>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
    <script type="text/javascript">
        const ILLTYPE = ['肺结核', '流行性感冒', 'HIV', ''];
        const DATETYPE = ['年', '月', '日', ''];
        const IMGDATA = [

            '{% static 'image/Infection/cover.png' %}',

            '{% static 'image/Infection/FLUByDay.jpg' %}',
            '{% static 'image/Infection/FLUByMonth.jpg' %}',
            '{% static 'image/Infection/FLUByYear.jpg' %}',

            '{% static 'image/Infection/HIVByDay.jpg' %}',
            '{% static 'image/Infection/HIVByMonth.jpg' %}',
            '{% static 'image/Infection/HIVByYear.jpg' %}',

            '{% static 'image/Infection/TUBByDay.jpg' %}',
            '{% static 'image/Infection/TUBByMonth.jpg' %}',
            '{% static 'image/Infection/TUBByYear.jpg' %}'
        ]
        new Vue({
            el: '#app',
            data: {
                illTypeChoosed: '',
                dateTypeChoosed: '',
                illTypeList: [],
                dateTypeList: [],
                img_display: '',
                isChoose: false,
            },
            created() {
                this.initData();
            },
            mounted() {

            },
            methods: {
                illTypeChange() {
                    console.log(this.illTypeChoosed)
                    // this.dataMap();
                },
                dateTypeChange() {
                    console.log(this.dateTypeChoosed)
                    // this.dataMap();
                },
                dataAnalys() {
                    // console.log('数据分析')
                    alert('玩命开发中。。。。。。')
                },
                imgDraw() {
                    //  console.log('图标绘制')
                    if (this.illTypeChoosed == '') {
                        alert('请选择传染病类型!')
                        return;
                    }
                    if (this.dateTypeChoosed == '') {
                        alert('请选择年月日!')
                        return;
                    }
                    this.dataMap();

                },
                dataMap() {
                    if (this.illTypeChoosed == '' || this.dateTypeChoosed == '') {
                        this.img_display = IMGDATA[0];
                        this.isChoose = false;
                    } else if (this.illTypeChoosed == '肺结核' && this.dateTypeChoosed == '年') {
                        this.img_display = IMGDATA[9];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == '肺结核' && this.dateTypeChoosed == '月') {
                        this.img_display = IMGDATA[8];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == '肺结核' && this.dateTypeChoosed == '日') {
                        this.img_display = IMGDATA[7];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == '流行性感冒' && this.dateTypeChoosed == '年') {
                        this.img_display = IMGDATA[3];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == '流行性感冒' && this.dateTypeChoosed == '月') {
                        this.img_display = IMGDATA[2];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == '流行性感冒' && this.dateTypeChoosed == '日') {
                        this.img_display = IMGDATA[1];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == 'HIV' && this.dateTypeChoosed == '年') {
                        this.img_display = IMGDATA[6];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == 'HIV' && this.dateTypeChoosed == '月') {
                        this.img_display = IMGDATA[5];
                        this.isChoose = true;
                    } else if (this.illTypeChoosed == 'HIV' && this.dateTypeChoosed == '日') {
                        this.img_display = IMGDATA[4];
                        this.isChoose = true;
                    }
                },
                initData() {
                    for (let i = 0; i < ILLTYPE.length; i++) {
                        this.illTypeList.push(ILLTYPE[i]);
                    }
                    for (let i = 0; i < DATETYPE.length; i++) {
                        this.dateTypeList.push(DATETYPE[i]);
                    }
                    this.img_display = IMGDATA[0];
                }
            }
        });
    </script>
</body>

</html>